package org.javaforever.cookieshop.service;

import java.util.List;
import java.util.Set;
import org.javaforever.cookieshop.domain.PermissionBean;
import org.javaforever.cookieshop.domain.RoleBean;

public interface RoleService{
	public List<RoleBean> listAllRoles() throws Exception;
	public Boolean updateRole(RoleBean role) throws Exception;
	public Boolean deleteRole(Long id) throws Exception;
	public Boolean addRole(RoleBean role) throws Exception;
	public boolean softDeleteRole(Long id) throws Exception;
	public RoleBean findRoleById(Long id) throws Exception;
	public RoleBean findRoleByRoleName(String roleName) throws Exception;
	public List<RoleBean> listActiveRoles() throws Exception;
	public void deleteAllRoles(String ids) throws Exception;
	public void softDeleteAllRoles(String ids) throws Exception;
	public Boolean toggleRole(Long id) throws Exception;
	public Boolean toggleOneRole(Long id) throws Exception;
	public List<RoleBean> searchRolesByFieldsByPage(RoleBean role,Integer pagesize,Integer pagenum) throws Exception;
	public Boolean activateRole(Long id) throws Exception;
	public void activateAllRoles(String ids) throws Exception;
	public List<RoleBean> searchRolesByFields(RoleBean role) throws Exception;
	public Boolean cloneRole(Long id) throws Exception;
	public void cloneAllRoles(String ids) throws Exception;
	public Integer countSearchRolesByFieldsRecords(RoleBean role) throws Exception;
	public Integer countActiveRoleRecords() throws Exception;
	public Boolean assignPermissionsToRole(Long roleId,String permissionIds) throws Exception;
	public Boolean revokePermissionsFromRole(Long roleId,String permissionIds) throws Exception;
	public Set<PermissionBean> listActiveRolePermissionsUsingRoleId(Long roleId) throws Exception;
	public Set<PermissionBean> listAvailableActiveRolePermissionsUsingRoleId(Long roleId) throws Exception;
}
